package com.example.demo.app;

import com.example.demo.domain.base.BaseResult;
import com.example.demo.domain.entity.CmsCategoryDO;
import com.example.demo.service.CmsCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 问题分类
 *
 * @author haochen78
 * @date 2025/11/6 17:34
 **/
@RestController
@RequestMapping("/app/cms/category")
public class CmsCategoryController {
    
    @Autowired
    private CmsCategoryService cmsCategoryService;
    
    @GetMapping("/list")
    public BaseResult<List<CmsCategoryDO>> cmsCategoryList(){
        return BaseResult.success(cmsCategoryService.list());
    }
}
